home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 378 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.7 KB  |  49 lines

  1. Newsgroups: comp.std.c
  2. Path: blackbush.xlink.net!slsv6bt!news
  3. From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
  4. Subject: Re: how pass argv to exec cde ?
  5. In-Reply-To: Ronald Fischer's message of 14 Feb 1996 07:48:37 GMT
  6. Message-ID: <KANZE.96Feb19172802@slsvewt.lts.sel.alcatel.de>
  7. Sender: news@lts.sel.alcatel.de
  8. Organization: SEL
  9. References: <4fbd0o$aj5@sunsic.si.univ-compiegne.fr> <4fs44l$3p8@moody.mchh.siemens.de>
  10. Date: 19 Feb 1996 16:28:01 GMT
  11.  
  12. In article <4fs44l$3p8@moody.mchh.siemens.de> Ronald Fischer
  13. <ronald.fischer@uebemc.siemens.de> writes:
  14.  
  15. |> capi@hds.univ-compiegne.fr () wrote:
  16. |> >hello everybody
  17. |> >i hope that i am in the right group !
  18.  
  19. You're not.  This should have been in comp.os.msdos.programmer.
  20.  
  21. |> >i want do start the edit.com program via a C file
  22. |> >the cde is c:\dos\edit.com
  23. |> >and the argument is the name of a file, for exemple zoo.asm
  24. |> >
  25. |> >i've try the exec..(path, argv) cde with
  26. |> >path="c:\\dos\\edit.com" and
  27. |> >argv[0]="zoo.asm"
  28. |> >argv[1]=null
  29. |> >
  30. |> >but when edit start i've got an error : incorrect file name (for edit)
  31. |> >where is the error ?
  32. |> >who could help me ?
  33. |> >many thanks for your reply
  34. |> >
  35. |> The correct code is either
  36. |> {
  37. |>   char const path[]="c:\\dos\\edit.com";
  38. |>   execl(path,path,"zoo.asm",0);
  39.                                ^
  40.  
  41. Wrong.  This is one of the rare cases where you have to cast the 0 (or
  42. NULL) to the correct type.
  43. -- 
  44. James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
  45. GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
  46. Conseils, Θtudes et rΘalisations en logiciel orientΘ objet --
  47.                 -- A la recherche d'une activitΘ dans une region francophone
  48.  
  49.